/**
 * @file 模板
 * @author 姓名
 * @createDate
 */
import React, { lazy, Suspense } from 'react';
import { createBrowserRouter } from 'react-router-dom';

const Layout = lazy(() => import(/* webpackChunkName: "layout333" */ '~/layout'));
const Home = lazy(() => import(/* webpackChunkName: "layout333" */ '~/views/home'));
const Login = lazy(() => import(/* webpackChunkName: "layout333" */ '~/views/login'));
// #----------- 上: ts类型定义 ----------- 分割线 ----------- 下: JS代码 -----------

const router = createBrowserRouter([
	{
		path: '/',
		element: <Layout></Layout>,
		children: [
			{ path: '/login', element: <Login></Login> },
			{
				path: '/home',
				element: <Home></Home>
			}
		]
	}
]);

export default router;
